package com.tanhua.app.controller;

import com.tanhua.app.interceptor.UserHolder;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class HuanxinController {


    @GetMapping(value = "/huanxin/user",name = "获取环信账户和密码")
    public ResponseEntity huanxinUser(){
        Long username = UserHolder.getUserId();

        Map<String,String> result = new HashMap<>();
        result.put("username", username.toString());
        result.put("password", "123456");

        return ResponseEntity.ok(result);
    }
}
